package com.jq.mybatisspringbootdemo.entity;

import lombok.Data;

import java.util.List;

@Data
public class User2 {
    private Long id;
    private String username;
    // 注意：数据库列名为 `password`，但这里我们故意用一个不同的名字来演示别名
    private String userPassword;
    private String email;
    // 新增一个订单列表，用于一对多映射
    private List<Order> orders;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public List<Order> getOrders() {
        return orders;
    }

    public void setOrders(List<Order> orders) {
        this.orders = orders;
    }
}
